#ifndef KENOSQL_H
#define KENOSQL_H

#include "tracksql.h"

#define KENO_GAMEID_SIZE		16
typedef char KenoGameID[KENO_GAMEID_SIZE];

class KenoBet;

//
// All money values are in cents (100 == $1, 25 == $.25, 1 == $.01)
//
// IMPORTANT:  Access to this class is NOT thread-safe.  That's handled at
//			   the next level up (with calls to lock()/unlock()).
//

class KenoSQL
{
	public:
		KenoSQL(TrackSQL* tracker);

		int32 createGame(int32 casinoId,
			const PID& pid, bool8 forMoney, SESSIONID sessionid, int32 compFactor,
			KenoGameID gid, int32 *balance, int32 *comp,
			KenoBet *bet, int32 numGames, bool8 newGroup);

		int32 gameDone(int32 casinoId, const PID&, bool8 forMoney, KenoGameID gid,
			int32 balanceAdjust, int32 *balance, int32 *comp,
			int32 *kenoresults);

		int32 getPayTable(uint8 *paytable);

		int32 getPlayerLimits(const PID& pid, int32 gameId, uint8 machId,
				int32* compFactor);

		int32 getDenominations(int32 *DenomValues);

        inline void lock()   { tracker->lock(); } ;

        inline void unlock() { tracker->unlock(); } ;

#ifdef FORCED_KENO
		// CSN-12127 - Retrieve forced results from database
		int32 getForcedResults(const PID& pid, int32 gameId, String& results);
#endif

    protected:
        TrackSQL*   tracker;


};

#endif
